//
//  XUEmotionViewCell.m
//  新浪微博
//
//  Created by xuwenxin on 15-4-18.
//  Copyright (c) 2015年 xuwenxin. All rights reserved.
//

#import "XUEmotionViewCell.h"
#import "NSString+Emoji.h"
#import "XUEmotionModel.h"
@interface XUEmotionViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *emotionImage;

@property (weak, nonatomic) IBOutlet UILabel *emotionLabel;

@end


@implementation XUEmotionViewCell

/*
 /Users/xuwenxin/Library/Developer/CoreSimulator/Devices/3B0D2186-9ED2-4057-87B0-D4531D9AF8FE/data/Containers/Bundle/Application/9DDB8426-987C-49C5-8CAA-A7A7CC6BECB2/新浪微博表情转模型.app/Emoticons/display_only/
 */

- (void)setModel:(XUEmotionModel *)model
{
    _model = model;
    self.emotionImage.image = nil;
    self.emotionLabel.hidden = YES;
    //    NSLog(@"dict======%@",dict);
    if ([model.type isEqualToString:@"0"]) {
    self.emotionImage.image = [UIImage imageNamed:model.imgPath];
    } else if([model.type isEqualToString:@"1"]) {
        self.emotionLabel.hidden = NO;
        self.emotionLabel.text = model.code;
    } else {
        self.emotionImage.image = [UIImage imageNamed:model.png];
    }
    

}

@end
